package com.whale.cloud.util.rest.condition;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.whale.cloud.util.rest.dataengine.LogicExpression;
import com.whale.cloud.util.rest.schema.Column;

import java.util.List;

/** Created by paco on 5/6/2017. */
public interface Condition {
  public String getCountSql();

  public Object[] getQueryDataParam();

  public void setOrderBy(JSONArray orderby);

  public void setPage(int beginIndex, int endIndex);

  public String getQuerySql(List<Column> c);

  public void setCondition(LogicExpression le);

  public String getCreateSql(JSONObject dataParam, List<Column> userColumns);

  public Object[] getCreateDataParam();

  public String getUpdateSql(JSONObject dataParam, List<Column> userColumns);

  public Object[] getUpdateDataParam();

  public String getDeleteSql(JSONObject dataParam);
}
